package com.yu.boot.admin.service;

import com.lhy.commonweb.service.AbstractService;
import com.yu.boot.admin.model.CategoryCover;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class CategoryCoverService extends AbstractService<CategoryCover, Integer> {
    public CategoryCoverService(@Qualifier("categoryCoverMapper") Mapper<CategoryCover> mapper) {
        super(mapper);
    }

    public List<CategoryCover> listByUserId(Integer userId){
        List<CategoryCover> select = this.mapper.select(new CategoryCover().setUserId(userId));
        return select;
    }

    public List<CategoryCover> listByUserIdCoverName(Integer userId,String coverName){
        List<CategoryCover> select = this.mapper.select(new CategoryCover().setUserId(userId).setCoverName(coverName));
        return select;
    }

}
